{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "906995c1",
   "metadata": {},
   "source": [
    "-------\n",
    "* 2022/9/26/week06\n",
    "* python学习记录\n",
    "-------"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5cdd677a",
   "metadata": {},
   "source": [
    "# 本周知识点\n",
    "###### 1.随机函数\n",
    "###### 2.时间函数"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c1f16de7",
   "metadata": {},
   "source": [
    "## 1.随机函数\n",
    ">##### 1.random.random():生成随机数，0-1之间随机数\n",
    ">##### 2.random.radint():生成随机数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "0be7aea3",
   "metadata": {},
   "outputs": [],
   "source": [
    "import random"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "1a3ceeee",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on built-in function random:\n",
      "\n",
      "random() method of random.Random instance\n",
      "    random() -> x in the interval [0, 1).\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(random.random) # 0-1 float 小数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "ebc39b17",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.09221625370172626"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "random.random()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "52991f26",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on method randint in module random:\n",
      "\n",
      "randint(a, b) method of random.Random instance\n",
      "    Return random integer in range [a, b], including both end points.\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(random.randint) # 整数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "535f9071",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "random.randint(0,6)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "fb5e91cd",
   "metadata": {},
   "source": [
    "## 2.时间函数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "5f262844",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
